(function (screens) {
    let screen_list = [],
        screen_strs = "";

    screens.forEach(screen_item => {
        let screen_info = {
            name: screen_item.name,
            goods: []
        };

        screen_strs += screen_item.name + "\n";

        screen_item.random_goods.forEach(good_item => {
            let good_info = {
                name: good_item.name,
                rate: 0
            };

            screen_item.random_arr.forEach(rate_item => {
                // console.log(rate_item, good_item);
                if (rate_item.gid == good_item._id) {
                    good_info.rate = rate_item.rate;
                }
            });

            screen_info.goods.push(good_info);
            screen_strs += "\t爆率: " + good_info.rate + "\t" + good_info.name + "\n";
        });

        screen_list.push(screen_info);
    });

    console.log(screen_list, screen_strs);
})(data.data.screens);


